﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Orchard.Localization;
using Orchard.Security;
using Orchard.UI.Navigation;

namespace Bootstrap
{
    public class AdminMenu : INavigationProvider
    {
        public string MenuName
        {
            get { return "admin"; }
        }

        public Localizer T { get; set; }

        public void GetNavigation(NavigationBuilder builder)
        {
            builder.Add(
                T("Appearance"),
                "15",
                menu =>
                menu
                    .Action("Settings", "Admin", new { area = "Bootstrap" })
                    .Permission(StandardPermissions.SiteOwner)
                    .Add(
                        T("Settings"),
                        s => s
                             .Action("Settings", "Admin", new { area = "Bootstrap" })
                             .Permission(StandardPermissions.SiteOwner)
                    )
                    .Add(
                        T("Features"),
                        f => f
                             .Action("Features", "Admin", new { area = "Bootstrap" })
                             .Permission(StandardPermissions.SiteOwner)
                    )
                    .Add(
                        T("Variables"),
                        v => v
                             .Action("Variables", "Admin", new { area = "Bootstrap" })
                             .Permission(StandardPermissions.SiteOwner)
                    )
                    .Add(
                        T("Import"),
                        v => v
                            .Action("Import", "Admin", new { area = "Bootstrap"})
                            .Permission(StandardPermissions.SiteOwner)
                    )
                    .Add(
                        T("Export"),
                        v => v
                            .Action("Export", "Admin", new { area = "Bootstrap" })
                            .Permission(StandardPermissions.SiteOwner)
                    )
            );
        }
    }
}
